package com.example.bookKeep.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.bookKeep.entity.Book;
import com.example.bookKeep.request.BookListRequest;
import com.example.bookKeep.vo.BookHomeVO;
import com.example.bookKeep.vo.BookMonthDayNumVO;
import com.example.bookKeep.vo.StatisticsVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookMapper extends BaseMapper<Book> {

    BookHomeVO homeStatistics(@Param("yearMonth") String yearMonth);

    List<StatisticsVO> categoryMonthStatistics(@Param("yearMonth") String ym);

    List<StatisticsVO> purchaserMonthStatistics(@Param("yearMonth") String ym);

    List<StatisticsVO> categoryYearStatistics(@Param("year") String y);

    List<StatisticsVO> purchaserYearStatistics(@Param("year") String y);

    List<Book> listByMonth(@Param("ym") String ym);

    List<Book> listByYear(@Param("y") String y);

    List<String> listPurchaser();

    List<String> listDirector();

    List<Book> listByRequest(@Param("bookListRequest") BookListRequest bookListRequest);

    List<BookMonthDayNumVO> monthDayNum(@Param("ym") String ym);
}